package com.mxq.eclipse.mqtt.demo.subscribe;

import lombok.Data;

/**
 * MQTT订阅实体
 *
 * @author xiaoqiang
 * @date 2020-05-09 15:57
 */
@Data
public class MqttSubscribeDto {

    /** MQTT服务器地址 */
    private String broker;
    /** 主题 */
    private String [] topics;
    /** 账号 */
    private String userName;
    /** 密码 */
    private String password;
    /** 客户端ID */
    private String clientId;
    /** 是否清除session*/
    private boolean cleanSession;
    /** 设置连接超时时间 单位秒*/
    private Integer connectionTimeOut;
    /** 设置会话心跳时间 单位秒*/
    private Integer keepAlive;
    /** 信号质量 */
    private Integer qos;

    public MqttSubscribeDto() {
    }

    public MqttSubscribeDto(String[] topics) {
        this.topics = topics;
    }

    public MqttSubscribeDto(String[] topics, String userName, String password) {
        this.topics = topics;
        this.userName = userName;
        this.password = password;
    }
}
